/**
 * Created with IntelliJ IDEA.
 * Description:
 * https://gitee.com/li--jiaqiang/java-test.git
 * git pull
 * git pull origin master
 * git pull origin master --allow-unrelated-histories
 * User: 86187
 * Date: 2022-05-03
 * Time: 10:28
 */

//Scanner scan = new Scanner(System.in);

import java.util.Scanner;

public class TestDemo3 {

    /**
     * 递归求斐波那契数列
     * @param n
     * @return
     */
    public static int fibonacci(int n) {
        if(n == 1 || n == 2) {
            return 1;
        }

        return fibonacci(n-1) + fibonacci(n - 2);
    }

    public static void main(String[] args) {
        System.out.println(fibonacci(7));
    }
}
